package hcn.protocol.brandnew.zhenliao.yaopin;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import org.atag.sysrouter.annotation.DictionaryMapping;


/**
 * 门诊处方明细查询-响应消息(失败) - ODS_03040008_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class GetPrescriptionDetailResponse {

    /**
     * 医院代码
     */
    @XmlElement(name = "VisitOrganization")
    private String visitOrganization;
    /**
     * 医院名称
     */
    @XmlElement(name = "VisitOrganizationName")
    private String visitOrganizationName;
    /**
     * 开方日期
     */
    @XmlElement(name = "PrescriptionDate")
    private String prescriptionDate;
    /**
     * 患者姓名
     */
    @XmlElement(name = "Name")
    private String name;
    /**
     * 患者性别
     */
    @XmlElement(name = "Sex")
    private String sex;
    /**
     * 出生日期
     */
    @XmlElement(name = "BirthDate")
    @XmlJavaTypeAdapter(DateTimeAdapter.class)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthDate;
    /**
     * 患者手机号
     */
    @XmlElement(name = "PatientPhone")
    private String patientPhone;
    /**
     * 证件类型
     */
    @XmlElement(name = "IdCardCode")
    @DictionaryMapping(id = "CV02_01_101")
    private String idCardCode;
    /**
     * 身份证号码
     */
    @XmlElement(name = "IdCard")
    private String idCard;
    /**
     * 卡类型
     */
    @XmlElement(name = "MedicalCardType")
    @DictionaryMapping(id = "rmp.dic.medicalCardType")
    private String medicalCardType;
    /**
     * 诊疗卡号码
     */
    @XmlElement(name = "MedicalCardID")
    private String medicalCardID;
    /**
     * 科室代码
     */
    @XmlElement(name = "VisitDeptCode")
    private String visitDeptCode;
    /**
     * 科室名称
     */
    @XmlElement(name = "VisitDeptName")
    private String visitDeptName;
    /**
     * 开方医师ID
     */
    @XmlElement(name = "PrescriptionDoctor")
    private String prescriptionDoctor;
    /**
     * 开方医师姓名
     */
    @XmlElement(name = "PrescriptionDoctorName")
    private String prescriptionDoctorName;
    /**
     * 病人性质
     */
    @XmlElement(name = "PatientPropertiesName")
    private String patientPropertiesName;
    /**
     * 临床诊断
     */
    @XmlElement(name = "ClinicalDiagnose")
    private String clinicalDiagnose;
    /**
     * 过敏药物
     */
    @XmlElement(name = "AllergyMedication")
    private String allergyMedication;
    /**
     * 地址
     */
    @XmlElement(name = "Address")
    private String address;
    /**
     * 允许修改标志
     */
    @XmlElement(name = "UpdateSign")
    private String updateSign;
    /**
     * 药品类型
     */
    @XmlElement(name = "DrugType")
    private String drugType;
    /**
     * 处方id
     */
    @XmlElement(name = "PrescriptionRecordId")
    private String prescriptionRecordId;
    /**
     * 处方号码
     */
    @XmlElement(name = "RecipeNumber")
    private String recipeNumber;
    /**
     * 审核状态
     */
    @XmlElement(name = "AuditStatus")
    private String auditStatus;
    /**
     * 审核人
     */
    @XmlElement(name = "Auditor")
    private String auditor;
    /**
     * 审核意见
     */
    @XmlElement(name = "AuditMind")
    private String auditMind;
    /**
     * 处方药品
     */
    @XmlElementWrapper(name = "PrescriptionDrugs")
    @XmlElement(name = "PrescriptionDrug")
    private List<PrescriptionDrug> prescriptionDrugs;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class PrescriptionDrug {

        /**
         * 处方明细id
         */
        @XmlElement(name = "PrescriptionDetailId")
        private String prescriptionDetailId;
        /**
         * 药品id
         */
        @XmlElement(name = "DrugsNumber")
        private String drugsNumber;
        /**
         * 药品名称
         */
        @XmlElement(name = "DrugName")
        private String drugName;
        /**
         * 药品产地id
         */
        @XmlElement(name = "DrugProductionPlaceId")
        private String drugProductionPlaceId;
        /**
         * 药品产地名称
         */
        @XmlElement(name = "DrugProductionPlace")
        private String drugProductionPlace;
        /**
         * 药品规格
         */
        @XmlElement(name = "DrugSpecifications")
        private String drugSpecifications;
        /**
         * 单位/药房单位
         */
        @XmlElement(name = "DrugstoreUnit")
        private String drugstoreUnit;
        /**
         * 单价
         */
        @XmlElement(name = "DrugUnitPrice")
        private String drugUnitPrice;
        /**
         * 默认一次剂量
         */
        @XmlElement(name = "DefaultOnceDosage")
        private String defaultOnceDosage;
        /**
         * 药品剂量
         */
        @XmlElement(name = "OnceDosage")
        private String onceDosage;
        /**
         * 剂量单位
         */
        @XmlElement(name = "DosageUnit")
        private String dosageUnit;
        /**
         * 药品数量/总量
         */
        @XmlElement(name = "DrugSendNumber")
        private String drugSendNumber;
        /**
         * 用药天数
         */
        @XmlElement(name = "MedicineDays")
        private Short medicineDays;
        /**
         * 频次代码
         */
        @XmlElement(name = "DrugUsingRate")
        private String drugUsingRate;
        /**
         * 频次名称
         */
        @XmlElement(name = "DrugUsingRateName")
        private String drugUsingRateName;
        /**
         * 用法代码
         */
        @XmlElement(name = "DrugUsePathwaysCode")
        private String drugUsePathwaysCode;
        /**
         * 用法名称
         */
        @XmlElement(name = "DrugUsePathwaysName")
        private String drugUsePathwaysName;
        /**
         * 代煎标志
         */
        @XmlElement(name = "BoilSign")
        private Byte boilSign;
        /**
         * 药品煎法编码
         */
        @XmlElement(name = "HerbalMedicineDecoction")
        private Integer herbalMedicineDecoction;
        /**
         * 药品脚注编码
         */
        @XmlElement(name = "HerbalFootNote")
        private String herbalFootNote;
        /**
         * 药品脚注名称
         */
        @XmlElement(name = "HerbalFootNoteName")
        private String herbalFootNoteName;
        /**
         * 药品贴数
         */
        @XmlElement(name = "PiecesChineseMedicineAgentNumb")
        private Byte piecesChineseMedicineAgentNumb;
        /**
         * 药品组号
         */
        @XmlElement(name = "DrugsGroupNumber")
        private String drugsGroupNumber;
        /**
         * 药品顺序号
         */
        @XmlElement(name = "SortNumber")
        private String sortNumber;
        /**
         * 药品备注
         */
        @XmlElement(name = "Remark")
        private String remark;
    }

}
